package com.jdbc.pet;

public class User {
    private int id;
    private String username;
    private String password;
    private int points;
    private String phoneNumber;
    private boolean isAdmin;

    // 构造函数
    public User() {}

    // 带参数的构造函数
    public User(int id, String username, String password, int points, String phoneNumber, boolean isAdmin) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.points = points;
        this.phoneNumber = phoneNumber;
        this.isAdmin = isAdmin;
    }

    // Getter和Setter方法
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getPoints() {
        return points;
    }

    public void setPoints(int points) {
        this.points = points;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public boolean isAdmin() {
        return isAdmin;
    }

    public void setAdmin(boolean admin) {
        isAdmin = admin;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", points=" + points +
                ", phoneNumber='" + phoneNumber + '\'' +
                ", isAdmin=" + isAdmin +
                '}';
    }
}
